﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Webcar.Entitys
{
    public class v_all_users
    {
        [System.ComponentModel.DataAnnotations.Key]
        public string account
        {
            get;
            set;
        }
        public string cn
        {
            get;
            set;
        }
        public string name
        {
            get;
            set;
        }
        public string deptname
        {
            get;
            set;
        }
        public string corpname
        {
            get;
            set;
        }
        public string password
        {
            get;
            set;
        }
        public string oldpass
        {
            get;
            set;
        }
        public string loginenable
        {
            get;
            set;
        }
        [NotMapped]
        public bool IsLoginEnable
        {
            get { return loginenable == "1"; }
        }
        public string user_source
        {
            get;
            set;
        }
        public string is_super
        {
            get;
            set;
        }
        [NotMapped]
        public bool IsAdmin
        {
            get { return is_super == "T"; }
        }
        public string deptcode
        {
            get;
            set;
        }
        public string corpcode
        {
            get;
            set;
        }
        public string ori_dept
        {
            get;
            set;
        }
        
    }
}
